<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!--
$Id: index.html 278 2009-08-18 11:21:55Z ryandesign.com $
-->
<html>
<head>
<title>An image map created in JavaScript</title>
<script type="text/javascript">
window.onload = function() {
	var map = document.createElement('map');
	map.id = 'graph-map';
	map.name = 'graph-map';
	
	var area = document.createElement('area');
	area.alt = 'hello';
	area.title = 'hello';
	area.href = 'javascript:alert("hello")';
	area.shape = 'poly';
	area.coords = '83,29 81,22 75,15 67,10 56,7 44,5 32,7 21,10 13,15 7,22 5,29 7,37 13,43 21,49 32,52 44,53 56,52 67,49 75,43 81,37';
	map.appendChild(area);
	
	area = document.createElement('area');
	area.alt = 'world';
	area.title = 'world';
	area.href = 'javascript:alert("world")';
	area.shape = 'poly';
	area.coords = '168,125 166,118 160,111 151,106 139,103 125,101 112,103 100,106 91,111 84,118 82,125 84,133 91,139 100,145 112,148 125,149 139,148 151,145 160,139 166,133';
	map.appendChild(area);
	
	var img = document.createElement('img');
	img.src = 'graph.png';
	img.useMap = '#graph-map';
	img.border = 0;
	
	var div = document.getElementById('container');
	div.appendChild(map);
	div.appendChild(img);
}
</script>
</head>
<body>
<div id="container"></div>
</body>
</html>
